import request from '@/utils/request'
import qs from 'qs'

export function getOrderApi(id) {
  return request({
    url: `/order/${id}`,
    method: 'get'
  })
}
export function getOrdersApi(pageNo, pageSize, order) {
  return request({
    url: `/order?${qs.stringify(order)}`,
    params:{
      pageNo: pageNo,
      pageSize: pageSize,
    },
    method: 'get'
  })
}
export function delOrderApi(id) {
  return request({
    url: `/order/${id}`,
    method: 'delete'
  })
}
export function delOrdersApi(orders) {
  return request({
    url: `/order`,
    data:orders,
    method: 'delete'
  })
}
export function updateOrderApi(form) {
  return request({
    url: `/order`,
    method: 'put',
    data:form
  })
}
